import logging,yagmail
def log():
    logging.basicConfig(filename='rizhi.log',
                        level=logging.DEBUG,
                        filemode='w+',
                        format='%(levelname)s' '%(message)s' '%(asctime)s' '%(filename)s' '%(lineno)s'
                        )
def youjian(file):
    email=yagmail.SMTP(user='2018675435@qq.com',password='nnqakcckuzyqfebd',host='smtp.qq.com')
    email.send(to='2871590017@qq.com',subject='Mr.杨',contents='院长让你去趟办公室',attachments=file)
